home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / dmake38c.zip / STARTUP.MK < prev    next >
Text File  |  1992-01-22  |  3KB  |  137 lines

  1. # Generic UNIX DMAKE startup file.  Customize to suit your needs.
  2. # Should work for both SYSV, and BSD 4.3
  3. # See the documentation for a description of internally defined macros.
  4. #
  5. # Disable warnings for macros redefined here that were given
  6. # on the command line.
  7. __.SILENT := $(.SILENT)
  8. .SILENT   := yes
  9.  
  10. # Configuration parameters for DMAKE startup.mk file
  11. # Set these to NON-NULL if you wish to turn the parameter on.
  12. _HAVE_RCS    := yes        # yes => RCS  is installed.
  13. _HAVE_SCCS    := yes        # yes => SCCS is installed.
  14.  
  15. # Applicable suffix definitions
  16. A := .a        # Libraries
  17. E :=        # Executables
  18. F := .f        # Fortran
  19. O := .o        # Objects
  20. P := .p        # Pascal
  21. S := .s        # Assembler sources
  22. V := ,v        # RCS suffix
  23.  
  24. # Recipe execution configurations
  25. SHELL        := /bin/sh
  26. SHELLFLAGS    := -ce
  27. GROUPSHELL    := $(SHELL)
  28. GROUPFLAGS    := 
  29. SHELLMETAS    := |();&<>?*][$$:\\#`'"
  30. GROUPSUFFIX    :=
  31. DIVFILE         = $(TMPFILE)
  32.  
  33. # Standard C-language command names and flags
  34.    CPP       := /lib/cpp        # C-preprocessor
  35.    CC      := cc        # C-compiler and flags
  36.    CFLAGS  +=
  37.  
  38.    AS      := as        # Assembler and flags
  39.    ASFLAGS += 
  40.  
  41.    LD       = $(CC)        # Loader and flags
  42.    LDFLAGS +=
  43.    LDLIBS   =
  44.  
  45. # Definition of $(MAKE) macro for recursive makes.
  46.    MAKE = $(MAKECMD) $(MFLAGS)
  47.  
  48. # Definition of Print command for this system.
  49.    PRINT = lpr
  50.  
  51. # Language and Parser generation Tools and their flags
  52.    YACC      := yacc        # standard yacc
  53.    YFLAGS +=
  54.    YTAB      := y.tab        # yacc output files name stem.
  55.  
  56.    LEX      := lex        # standard lex
  57.    LFLAGS +=
  58.    LEXYY  := lex.yy        # lex output file
  59.  
  60. # Other Compilers, Tools and their flags
  61.    PC    := pc            # pascal compiler
  62.    RC    := f77            # ratfor compiler
  63.    FC    := f77            # fortran compiler
  64.  
  65.    CO       := co        # check out for RCS
  66.    COFLAGS += -q
  67.  
  68.    AR     := ar            # archiver
  69.    ARFLAGS+= ruv
  70.  
  71.    RM       := /bin/rm        # remove a file command
  72.    RMFLAGS +=
  73.  
  74. # Implicit generation rules for making inferences.
  75. # We don't provide .yr or .ye rules here.  They're obsolete.
  76. # Rules for making *$O
  77.    %$O : %.c ; $(CC) $(CFLAGS) -c $<
  78.    %$O : %$P ; $(PC) $(PFLAGS) -c $<
  79.    %$O : %$S ; $(AS) $(ASFLAGS) $<
  80.    %$O : %.cl ; class -c $<
  81.    %$O : %.e %.r %.F %$F
  82.     $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
  83.  
  84. # Executables
  85.    %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBES)
  86.  
  87. # lex and yacc rules
  88.    %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
  89.    %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
  90.  
  91. # This rule tells how to make *.out from it's immediate list of prerequisites
  92. # UNIX only.
  93.    %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  94.  
  95. # RCS support
  96. .IF $(_HAVE_RCS)
  97.    % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
  98.    .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
  99. .END
  100.  
  101. # SCCS support
  102. .IF $(_HAVE_SCCS)
  103.    % : s.% ; get $<
  104.    .NOINFER : s.%
  105. .END
  106.  
  107. # Recipe to make archive files.
  108. %$A :
  109. [
  110.    $(AR) $(ARFLAGS) $@ $?
  111.    $(RM) $(RMFLAGS) $?
  112.    ranlib $@
  113. ]
  114.  
  115. # DMAKE uses this recipe to remove intermediate targets
  116. .REMOVE :; $(RM) -f $<
  117.  
  118. # AUGMAKE extensions for SYSV compatibility
  119. @B = $(@:b)
  120. @D = $(@:d)
  121. @F = $(@:f)
  122. "*B" = $(*:b)
  123. "*D" = $(*:d)
  124. "*F" = $(*:f)
  125. <B = $(<:b)
  126. <D = $(<:d)
  127. <F = $(<:f)
  128. ?B = $(?:b)
  129. ?F = $(?:f)
  130. ?D = $(?:d)
  131.  
  132. # Turn warnings back to previous setting.
  133. .SILENT := $(__.SILENT)
  134.  
  135. # Local startup file if any
  136. .INCLUDE .IGNORE: "_startup.mk"
  137.